package com.idanchuang.component.logback.config;

import com.idanchuang.component.core.config.AbstractCryptConfigBean;
import com.idanchuang.component.core.enums.AesEnum;

import java.util.Optional;

public class LogbackCryptConfig extends AbstractCryptConfigBean {

    public static LogbackCryptConfig INSTANCE;

    {
        synchronized (LogbackCryptConfig.class) {
            if (LogbackCryptConfig.INSTANCE == null) {
                LogbackCryptConfig.INSTANCE = this;
            }
        }
    }

    public LogbackCryptConfig() {
        super(AesEnum.AES128, "kdjxjforpeldjskx", "crypt#");
    }

    public static Optional<LogbackCryptConfig> getInstance() {
        return Optional.ofNullable(INSTANCE);
    }

}
